﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace NGroup.VTL.Core.Utilities
{
    public static class CommonFunction
    {
        public static string removeAccent(string ip_str_change)
        {
            Regex v_reg_regex = new Regex("\\p{IsCombiningDiacriticalMarks}+");
            string v_str_FormD = ip_str_change.Normalize(NormalizationForm.FormD);
            return v_reg_regex.Replace(v_str_FormD, string.Empty).Replace('\u0111', 'd').Replace('\u0110', 'D');
        }
        public static string fixNullString(string str)
        {
            return string.IsNullOrEmpty(str) ? string.Empty : str;
        }
    }
}
